package models;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;

import play.db.jpa.Model;

@Entity
public class Bairro extends Model {
	
	@OrderBy
	public String descricao;
	
	@OneToMany(mappedBy="bairro",cascade=CascadeType.PERSIST)
    public List<Imovel> imovels;
	
	@ManyToOne
	public Cidade cidade;
		
}
